doc: improve documentation of gtk_text_iter_inside_word()
authorSébastien Wilmet <swilmet@gnome.org>
Tue, 8 Apr 2014 20:43:25 +0000 (22:43 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Apr 2014 21:04:10 +0000 (14:04 -0700)
There is a possible confusion with the sentence:
"@iter is inside a natural-language word"

The iter should be viewed here as the pointed character (i.e. on the
right of the iter), not as a position between two characters.

Instead of improving the documentation, another solution would have been
to change the implementation so it is interpreted as an iter position
inside a word, i.e. between two characters that are part of a
natural-language word. But maybe some applications rely on the current
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=727908

gtk/gtktextiter.c

index 5b91919a61867747a276165223dbb579f20de58a..bb7fdb0f826e27d95a5460aa1f68c23ab88b3e41 100644 (file)
@@ -3402,12 +3402,15 @@ gtk_text_iter_ends_word (const GtkTextIter *iter)
 /**
  * gtk_text_iter_inside_word:
  * @iter: a #GtkTextIter
- * 
- * Determines whether @iter is inside a natural-language word (as
- * opposed to say inside some whitespace).  Word breaks are determined
- * by Pango and should be correct for nearly any language (if not, the
- * correct fix would be to the Pango word break algorithms).
- * 
+ *
+ * Determines whether the character pointed by @iter is part of a
+ * natural-language word (as opposed to say inside some whitespace).  Word
+ * breaks are determined by Pango and should be correct for nearly any language
+ * (if not, the correct fix would be to the Pango word break algorithms).
+ *
+ * Note that if gtk_text_iter_starts_word() returns %TRUE, then this function
+ * returns %TRUE too, since @iter points to the first character of the word.
+ *
  * Returns: %TRUE if @iter is inside a word
  **/
 gboolean